import request from '@/utils/request';

// 查询消息列表
function getMessagesList(params) {
  return request({
    url: '/api/messages',
    method: 'get',
    params,
  });
}

// 删除消息
function deleteMessages(Id) {
  return request({
    url: `/api/messages/${Id}`,
    method: 'delete',
  });
}

// 消息详情
function getMessagesDetail(id) {
  return request({
    url: `/api/messages/${id}`,
    method: 'get',
  });
}

// 编辑通知
function editMessage(data) {
  return request({
    url: '/api/messages/dood',
    method: 'post',
    data,
  });
}


export default {
  getMessagesList,
  deleteMessages,
  getMessagesDetail,
  editMessage,
};
